<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="entity.Dept,java.util.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />

<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />

<title>员工详细工资列表</title>
</head>

<body>
<c:if test="${!empty salary }" >
<form action="">
<table class="table table-border table-bordered table-bg" id="test_table">
			<thead>
			<tr>
				<th scope="col" colspan="11">员工详情工资</th>
			</tr>
			<tr class="text-c">
				<th width="35">ID</th>
				<th width="43">员工ID</th>
				<th width="43">岗位工资</th>
				<th width="43">薪级工资</th>
				<th width="43">职务工资</th>
				<th width="161">绩效工资</th>
				<th width="160">惩罚扣薪</th>
				<th width="43">应发工资</th>
				<th width="43">个人所得税</th>
				<th width="43">实发工资</th>
				<th width="43">操作</th>
			</tr>
		</thead>
	</table>
	<table class="table table-border table-bordered table-bg" id="test_table">
			<thead>
			<tr class="text-c">
				<th width="41">ID</th>
				<th width="50">员工ID</th>
				<th width="50">岗位工资</th>
				<th width="50">薪级工资</th>
				<th width="50">职务工资</th>
				<th width="50">加班工资</th>
				<th width="50">提成工资</th>
				<th width="50">奖        金</th>
				<th width="50">请假扣薪</th>
				<th width="50">迟到扣薪</th>
				<th width="50">旷工扣薪</th>
				<th width="50">应发工资</th>
				<th width="50">个人所得税</th>
				<th width="50">实发工资</th>
				<th width="50">操作</th>
			</tr>
		</thead>
		<tbody>
			<tr class="text-c">
				<td>${salary.id }</td>
				<td>${salary.empId }</td>
				<td>${salary.positionSal }</td>
				<td>${salary.xinjiSal }</td>
				<td>${salary.zhiwuSal }</td>
				<td>${salary.overtimeSal }</td>
				<td>${salary.deductionSal }</td>
				<td>${salary.bonusSal }</td>
				<td>${salary.leaveSal }</td>
				<td>${salary.lateSal }</td>
				<td>${salary.absentSal }</td>
				<td>${salary.allSal }</td>
				<td>${salary.privateDuty }</td>
				<td>${salary.factSal }</td>
				<td class="td-manage">
				<input type="button" onclick="detailSalary_edit(${salary.id})" value="编辑" />
				<input type="button" onclick="salary_del(${salary.id })" value="删除" />
				</td>
			</tr>
		</tbody>
	</table>
</form>
</c:if>

<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script>
<!-- 搜索操作 -->
<script type="text/javascript" src="js/search.js"></script>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>  <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript" src="lib/datatables/1.10.15/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">

//修改详细薪水
function detailSalary_edit(id){
	location.href="RecordEditDetailSalaryServlet?id="+id;
}
//删除
function salary_del(id){
	layer.confirm('确认要删除吗？',function(index){
		$.ajax(
				{
					url:'DelSalaryServlet',
					async : false,
		            cache : false,
		            traditional: true,
		            type : 'POST',
					data:{
						id : id
					},
					success:function(result){
						layer.closeAll();
						layer.msg('已删除!',{icon: 5,time:1000});
						window.location.reload();刷新父级页面
						var index = layer.getFrameIndex(window.name); //获取当前页面索引
						layer.close(index); //关闭当前页面
					},
					error:function(result){
						layer.closeAll();
						//layer.msg(result.msg);
					}
				});	
	});
}
</script>
</body>
</html>